// Tradex.Connectivity.Rithmic.h

#pragma once

#include "vcclr.h"
#include "NxCoreAPI.h"

#include "InstrumentCache.h"

using namespace System;
using namespace System::Collections::Generic;
using namespace System::Data::Common;
using namespace System::IO;
using namespace System::Reflection;

namespace Tradex {
	namespace Connectivity {
		namespace NxCore {


			public ref class NxCoreCache {
			
			public:

				[System::Security::SecurityCritical()]
				NxCoreCache(NxCoreGetDefinedString pfNxCoreGetDefinedString);

				String^ GetMarket (int index);

				[System::Security::SecurityCritical()]
				void SetTimestamp (const NxCoreSystem* pNxCoreSys);

				property DateTime Timestamp {
					DateTime get() {
						return _Timestamp;
					}
				}

				[System::Security::SecurityCritical()]
				InstrumentCache^ GetInstrumentCache (const NxCoreSystem* pNxCoreSys, const NxCoreMessage* pNxCoreMsg, const int symbolAtom32);

			private:

				array<String^>^ _Markets;

				DateTime _Timestamp;

				array<List<InstrumentCache^>^>^ _InstrumentData;

			};
		}
	}
}
